<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib prefix="fmt" 
           uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Insert title here</title>
</head>
<body>
	<a href="${pageContext.request.contextPath }/user/car"><button>返回购物车</button></a>
	<table width="100%" border=1 style="text-align:center">
		<tr>
			<td>收货人姓名</td>
			<td>联系电话</td>
			<td>收货地址</td>
			<td>别称</td>
			<td>操作</td>
		</tr>
		<c:if test="${addressList!=null}">
			<c:forEach items="${addressList}" var="myaddress">
				<tr>
					<td>${myaddress.name}</td>
					<td>${myaddress.phonenum}</td>
					<td>${myaddress.province}${myaddress.city}${myaddress.address}</td>
					<td>${myaddress.addressalias}</td>
					<td>
						<a href="${pageContext.request.contextPath }/user/deleteAddress?addressId=${myaddress.id}">删除</a>
					</td>
				</tr>
			</c:forEach>
		</c:if>
	</table>
</body>
</html>